//
//  SWScrollBarAllDelegate.h
//  SWScrollBar
//
//  Created by shaowei on 13-7-9.
//  Copyright (c) 2013年 LianZhan. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SWScrollItemDelegate.h"

@class SWScrollBar;

@protocol SWScrollBarDelegate <NSObject>

@optional
//单个item的宽度
- (CGFloat)scrollBar:(SWScrollBar *)scrollBar widthForItemAtIndex:(int)index;

//分隔view的宽度
- (CGFloat)widthForSplitView:(SWScrollBar *)scrollBar ;

//item事件响应回调
- (void)scrollBar:(SWScrollBar *)scrollBar didSelectItemAtIndex:(int)index;

@end


@protocol SWScrollBarDataSource <NSObject>

@required

//item的个数
- (NSInteger)itemNumberOfScrollBar:(SWScrollBar *)scrollBar;

//获取单个item
- (UIView<SWScrollItemDelegate> *)scrollBar:(SWScrollBar *)scrollBar itemAtIndex:(int)index;

@optional
//获取分隔的image
- (UIView *)splitViewOfScrollBar:(SWScrollBar *)scrollBar;

@end
